home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Displays.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  29.9 KB  |  781 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Displays.h
  3.  
  4.      Contains:    Display Manager Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1993-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DISPLAYS__
  18. #define __DISPLAYS__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __COMPONENTS__
  25.     #include <Components.h>
  26. #endif
  27.  
  28. #ifndef __VIDEO__
  29.     #include <Video.h>
  30. #endif
  31.  
  32.  
  33. #ifndef __APPLEEVENTS__
  34.     #include <AppleEvents.h>
  35. #endif
  36.  
  37. #ifndef __EVENTS__
  38.     #include <Events.h>
  39. #endif
  40.  
  41. #ifndef __PROCESSES__
  42.     #include <Processes.h>
  43. #endif
  44.  
  45. #ifndef __DIALOGS__
  46.     #include <Dialogs.h>
  47. #endif
  48.  
  49.  
  50.  
  51. #if PRAGMA_ONCE
  52. #pragma once
  53. #endif
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58.  
  59. #if PRAGMA_IMPORT
  60. #pragma import on
  61. #endif
  62.  
  63. #if PRAGMA_STRUCT_ALIGN
  64.     #pragma options align=mac68k
  65. #elif PRAGMA_STRUCT_PACKPUSH
  66.     #pragma pack(push, 2)
  67. #elif PRAGMA_STRUCT_PACK
  68.     #pragma pack(2)
  69. #endif
  70.  
  71. enum {
  72.                                                                 /* AppleEvents Core Suite */
  73.     kAESystemConfigNotice        = FOUR_CHAR_CODE('cnfg'),        /* Core Suite types */
  74.     kAEDisplayNotice            = FOUR_CHAR_CODE('dspl'),
  75.     kAEDisplaySummary            = FOUR_CHAR_CODE('dsum'),
  76.     keyDMConfigVersion            = FOUR_CHAR_CODE('dmcv'),
  77.     keyDMConfigFlags            = FOUR_CHAR_CODE('dmcf'),
  78.     keyDMConfigReserved            = FOUR_CHAR_CODE('dmcr'),
  79.     keyDisplayID                = FOUR_CHAR_CODE('dmid'),
  80.     keyDisplayComponent            = FOUR_CHAR_CODE('dmdc'),
  81.     keyDisplayDevice            = FOUR_CHAR_CODE('dmdd'),
  82.     keyDisplayFlags                = FOUR_CHAR_CODE('dmdf'),
  83.     keyDisplayMode                = FOUR_CHAR_CODE('dmdm'),
  84.     keyDisplayModeReserved        = FOUR_CHAR_CODE('dmmr'),
  85.     keyDisplayReserved            = FOUR_CHAR_CODE('dmdr'),
  86.     keyDisplayMirroredId        = FOUR_CHAR_CODE('dmmi'),
  87.     keyDeviceFlags                = FOUR_CHAR_CODE('dddf'),
  88.     keyDeviceDepthMode            = FOUR_CHAR_CODE('dddm'),
  89.     keyDeviceRect                = FOUR_CHAR_CODE('dddr'),
  90.     keyPixMapRect                = FOUR_CHAR_CODE('dpdr'),
  91.     keyPixMapHResolution        = FOUR_CHAR_CODE('dphr'),
  92.     keyPixMapVResolution        = FOUR_CHAR_CODE('dpvr'),
  93.     keyPixMapPixelType            = FOUR_CHAR_CODE('dppt'),
  94.     keyPixMapPixelSize            = FOUR_CHAR_CODE('dpps'),
  95.     keyPixMapCmpCount            = FOUR_CHAR_CODE('dpcc'),
  96.     keyPixMapCmpSize            = FOUR_CHAR_CODE('dpcs'),
  97.     keyPixMapAlignment            = FOUR_CHAR_CODE('dppa'),
  98.     keyPixMapResReserved        = FOUR_CHAR_CODE('dprr'),
  99.     keyPixMapReserved            = FOUR_CHAR_CODE('dppr'),
  100.     keyPixMapColorTableSeed        = FOUR_CHAR_CODE('dpct'),
  101.     keySummaryMenubar            = FOUR_CHAR_CODE('dsmb'),
  102.     keySummaryChanges            = FOUR_CHAR_CODE('dsch'),
  103.     keyDisplayOldConfig            = FOUR_CHAR_CODE('dold'),
  104.     keyDisplayNewConfig            = FOUR_CHAR_CODE('dnew')
  105. };
  106.  
  107. enum {
  108.     dmOnlyActiveDisplays        = true,
  109.     dmAllDisplays                = false
  110. };
  111.  
  112.  
  113. enum {
  114.                                                                 /* DMSendDependentNotification notifyClass */
  115.     kDependentNotifyClassShowCursor = FOUR_CHAR_CODE('shcr'),    /* When display mgr shows a hidden cursor during an unmirror */
  116.     kDependentNotifyClassDriverOverride = FOUR_CHAR_CODE('ndrv'), /* When a driver is overridden */
  117.     kDependentNotifyClassDisplayMgrOverride = FOUR_CHAR_CODE('dmgr'), /* When display manager is upgraded */
  118.     kDependentNotifyClassProfileChanged = FOUR_CHAR_CODE('prof') /* When DMSetProfileByAVID is called */
  119. };
  120.  
  121.  
  122. enum {
  123.                                                                 /* Switch Flags */
  124.     kNoSwitchConfirmBit            = 0,                            /* Flag indicating that there is no need to confirm a switch to this mode */
  125.     kDepthNotAvailableBit        = 1,                            /* Current depth not available in new mode */
  126.     kShowModeBit                = 3,                            /* Show this mode even though it requires a confirm. */
  127.     kModeNotResizeBit            = 4,                            /* Do not use this mode to resize display (for cards that mode drives a different connector). */
  128.     kNeverShowModeBit            = 5                                /* This mode should not be shown in the user interface. */
  129. };
  130.  
  131. /*    Summary Change Flags (sticky bits indicating an operation was performed)
  132.     For example, moving a display then moving it back will still set the kMovedDisplayBit.
  133. */
  134. enum {
  135.     kBeginEndConfigureBit        = 0,
  136.     kMovedDisplayBit            = 1,
  137.     kSetMainDisplayBit            = 2,
  138.     kSetDisplayModeBit            = 3,
  139.     kAddDisplayBit                = 4,
  140.     kRemoveDisplayBit            = 5,
  141.     kNewDisplayBit                = 6,
  142.     kDisposeDisplayBit            = 7,
  143.     kEnabledDisplayBit            = 8,
  144.     kDisabledDisplayBit            = 9,
  145.     kMirrorDisplayBit            = 10,
  146.     kUnMirrorDisplayBit            = 11
  147. };
  148.  
  149.  
  150. enum {
  151.                                                                 /* Notification Messages for extended call back routines */
  152.     kDMNotifyRequestConnectionProbe = 0,                        /* Like kDMNotifyRequestDisplayProbe only not for smart displays (used in wake before all busses are awake) */
  153.     kDMNotifyInstalled            = 1,                            /* At install time */
  154.     kDMNotifyEvent                = 2,                            /* Post change time */
  155.     kDMNotifyRemoved            = 3,                            /* At remove time */
  156.     kDMNotifyPrep                = 4,                            /* Pre change time */
  157.     kDMNotifyExtendEvent        = 5,                            /* Allow registrees to extend apple event before it is sent */
  158.     kDMNotifyDependents            = 6,                            /* Minor notification check without full update */
  159.     kDMNotifySuspendConfigure    = 7,                            /* Temporary end of configuration */
  160.     kDMNotifyResumeConfigure    = 8,                            /* Resume configuration */
  161.     kDMNotifyRequestDisplayProbe = 9,                            /* Request smart displays re-probe (used in sleep and hot plugging) */
  162.                                                                 /* Notification Flags */
  163.     kExtendedNotificationProc    = (1L << 16)
  164. };
  165.  
  166.  
  167. /* types for notifyType */
  168. enum {
  169.     kFullNotify                    = 0,                            /* This is the appleevent whole nine yards notify */
  170.     kFullDependencyNotify        = 1                                /* Only sends to those who want to know about interrelated functionality (used for updating UI) */
  171. };
  172.  
  173. /* DisplayID/DeviceID constants */
  174. enum {
  175.     kDummyDeviceID                = 0x00FF,                        /* This is the ID of the dummy display, used when the last "real" display is disabled.*/
  176.     kInvalidDisplayID            = 0x0000,                        /* This is the invalid ID*/
  177.     kFirstDisplayID                = 0x0100
  178. };
  179.  
  180. enum {
  181.                                                                 /* bits for panelListFlags */
  182.     kAllowDuplicatesBit            = 0
  183. };
  184.  
  185. enum {
  186.                                                                 /* bits for nameFlags */
  187.     kSuppressNumberBit            = 0,
  188.     kSuppressNumberMask            = 1,
  189.     kForceNumberBit                = 1,
  190.     kForceNumberMask            = 2,
  191.     kSuppressNameBit            = 2,
  192.     kSuppressNameMask            = 4
  193. };
  194.  
  195.  
  196.  
  197. /* Constants for fidelity checks */
  198. enum {
  199.     kNoFidelity                    = 0,
  200.     kMinimumFidelity            = 1,
  201.     kDefaultFidelity            = 500,                            /* I'm just picking a number for Apple default panels and engines*/
  202.     kDefaultManufacturerFidelity = 1000                            /* I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults)*/
  203. };
  204.  
  205. enum {
  206.     kAnyPanelType                = 0,                            /* Pass to DMNewEngineList for list of all panels (as opposed to specific types)*/
  207.     kAnyEngineType                = 0,                            /* Pass to DMNewEngineList for list of all engines*/
  208.     kAnyDeviceType                = 0,                            /* Pass to DMNewDeviceList for list of all devices*/
  209.     kAnyPortType                = 0                                /* Pass to DMNewDevicePortList for list of all devices*/
  210. };
  211.  
  212. /* portListFlags for DM_NewDevicePortList */
  213. enum {
  214.                                                                 /* Should offline devices be put into the port list (such as dummy display) */
  215.     kPLIncludeOfflineDevicesBit    = 0
  216. };
  217.  
  218.  
  219. /* confirmFlags for DMConfirmConfiguration */
  220. enum {
  221.     kForceConfirmBit            = 0,                            /* Force a confirm dialog */
  222.     kForceConfirmMask            = (1 << kForceConfirmBit)
  223. };
  224.  
  225.  
  226. /* Flags for displayModeFlags */
  227. enum {
  228.     kDisplayModeListNotPreferredBit = 0,
  229.     kDisplayModeListNotPreferredMask = (1 << kDisplayModeListNotPreferredBit)
  230. };
  231.  
  232.  
  233. /* Flags for itemFlags */
  234. enum {
  235.     kComponentListNotPreferredBit = 0,
  236.     kComponentListNotPreferredMask = (1 << kComponentListNotPreferredBit)
  237. };
  238.  
  239. enum {
  240.     kDisplayTimingInfoVersionZero = 1,
  241.     kDisplayTimingInfoReservedCountVersionZero = 16,
  242.     kDisplayModeEntryVersionZero = 0,                            /* displayModeVersion - original version*/
  243.     kDisplayModeEntryVersionOne    = 1                                /* displayModeVersion - added displayModeOverrideInfo*/
  244. };
  245.  
  246.  
  247. enum {
  248.     kMakeAndModelReservedCount    = 4                                /* Number of reserved fields*/
  249. };
  250.  
  251. typedef unsigned long                     DMFidelityType;
  252. /*
  253.    AVID is an ID for ports and devices the old DisplayID type
  254.       is carried on for compatibility
  255. */
  256.  
  257. typedef unsigned long                     AVIDType;
  258. typedef AVIDType                         DisplayIDType;
  259. typedef void *                            DMListType;
  260. typedef unsigned long                     DMListIndexType;
  261. typedef VDPowerStateRec                 AVPowerStateRec;
  262. typedef VDPowerStateRec *                AVPowerStatePtr;
  263.  
  264. struct DMDisplayTimingInfoRec {
  265.     UInt32                             timingInfoVersion;
  266.     UInt32                             timingInfoAttributes;        /* Flags */
  267.     SInt32                             timingInfoRelativeQuality;    /* quality of the timing */
  268.     SInt32                             timingInfoRelativeDefault;    /* relative default of the timing */
  269.  
  270.     UInt32                             timingInfoReserved[16];        /* Reserved */
  271. };
  272. typedef struct DMDisplayTimingInfoRec    DMDisplayTimingInfoRec;
  273.  
  274. typedef DMDisplayTimingInfoRec *        DMDisplayTimingInfoPtr;
  275.  
  276.  
  277. struct DMComponentListEntryRec {
  278.     DisplayIDType                     itemID;                        /* DisplayID Manager*/
  279.     Component                         itemComponent;                /* Component Manager*/
  280.     ComponentDescription             itemDescription;            /* We can always construct this if we use something beyond the compontent mgr.*/
  281.  
  282.     ResType                         itemClass;                    /* Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)*/
  283.     DMFidelityType                     itemFidelity;                /* How good is this item for the specified search?*/
  284.     ResType                         itemSubClass;                /* Subclass of group to put this panel.  Can use to do sub-grouping (eg volume for volume panel and mute panel)*/
  285.     Point                             itemSort;                    /* Set to 0 - future to sort the items in a sub group.*/
  286.  
  287.     unsigned long                     itemFlags;                    /* Set to 0 (future expansion)*/
  288.     ResType                         itemReserved;                /* What kind of code does the itemReference point to  (right now - kPanelEntryTypeComponentMgr only)*/
  289.     unsigned long                     itemFuture1;                /* Set to 0 (future expansion - probably an alternate code style)*/
  290.     unsigned long                     itemFuture2;                /* Set to 0 (future expansion - probably an alternate code style)*/
  291.     unsigned long                     itemFuture3;                /* Set to 0 (future expansion - probably an alternate code style)*/
  292.     unsigned long                     itemFuture4;                /* Set to 0 (future expansion - probably an alternate code style)*/
  293. };
  294. typedef struct DMComponentListEntryRec    DMComponentListEntryRec;
  295.  
  296. typedef DMComponentListEntryRec *        DMComponentListEntryPtr;
  297. /* ooo Move AVLocationRec to AVComponents.i AFTER AVComponents.i is created*/
  298.  
  299. struct AVLocationRec {
  300.     unsigned long                     locationConstant;            /* Set to 0 (future expansion - probably an alternate code style)*/
  301. };
  302. typedef struct AVLocationRec            AVLocationRec;
  303.  
  304. typedef AVLocationRec *                    AVLocationPtr;
  305.  
  306. struct DMDepthInfoRec {
  307.     VDSwitchInfoPtr                 depthSwitchInfo;            /* This is the switch mode to choose this timing/depth */
  308.     VPBlockPtr                         depthVPBlock;                /* VPBlock (including size, depth and format) */
  309.     UInt32                             depthFlags;                    /* VDVideoParametersInfoRec.csDepthFlags  */
  310.     UInt32                             depthReserved1;                /* Reserved */
  311.     UInt32                             depthReserved2;                /* Reserved */
  312. };
  313. typedef struct DMDepthInfoRec            DMDepthInfoRec;
  314.  
  315. typedef DMDepthInfoRec *                DMDepthInfoPtr;
  316.  
  317. struct DMDepthInfoBlockRec {
  318.     unsigned long                     depthBlockCount;            /* How many depths are there? */
  319.     DMDepthInfoPtr                     depthVPBlock;                /* Array of DMDepthInfoRec */
  320.     unsigned long                     depthBlockFlags;            /* Reserved */
  321.     unsigned long                     depthBlockReserved1;        /* Reserved */
  322.     unsigned long                     depthBlockReserved2;        /* Reserved */
  323. };
  324. typedef struct DMDepthInfoBlockRec        DMDepthInfoBlockRec;
  325.  
  326. typedef DMDepthInfoBlockRec *            DMDepthInfoBlockPtr;
  327.  
  328. struct DMDisplayModeListEntryRec {
  329.     UInt32                             displayModeFlags;
  330.     VDSwitchInfoPtr                 displayModeSwitchInfo;
  331.     VDResolutionInfoPtr             displayModeResolutionInfo;
  332.     VDTimingInfoPtr                 displayModeTimingInfo;
  333.     DMDepthInfoBlockPtr             displayModeDepthBlockInfo;    /* Information about all the depths*/
  334.     UInt32                             displayModeVersion;            /* What version is this record (now kDisplayModeEntryVersionOne)*/
  335.     StringPtr                         displayModeName;            /* Name of the timing mode*/
  336.     DMDisplayTimingInfoPtr             displayModeDisplayInfo;        /* Information from the display.*/
  337. };
  338. typedef struct DMDisplayModeListEntryRec DMDisplayModeListEntryRec;
  339.  
  340. typedef DMDisplayModeListEntryRec *        DMDisplayModeListEntryPtr;
  341.  
  342.  
  343. struct DependentNotifyRec {
  344.     ResType                         notifyType;                    /* What type was the engine that made the change (may be zero)*/
  345.     ResType                         notifyClass;                /* What class was the change (eg geometry, color etc)*/
  346.     DisplayIDType                     notifyPortID;                /* Which device was touched (kInvalidDisplayID -> all or none)*/
  347.     ComponentInstance                 notifyComponent;            /* What engine did it (may be 0)?*/
  348.  
  349.     unsigned long                     notifyVersion;                /* Set to 0 (future expansion)*/
  350.     unsigned long                     notifyFlags;                /* Set to 0 (future expansion)*/
  351.     unsigned long                     notifyReserved;                /* Set to 0 (future expansion)*/
  352.     unsigned long                     notifyFuture;                /* Set to 0 (future expansion)*/
  353. };
  354. typedef struct DependentNotifyRec        DependentNotifyRec;
  355.  
  356. typedef DependentNotifyRec *            DependentNotifyPtr;
  357.  
  358.  
  359. struct DMMakeAndModelRec {
  360.     ResType                         manufacturer;
  361.     UInt32                             model;
  362.     UInt32                             serialNumber;
  363.     UInt32                             manufactureDate;
  364.  
  365.     UInt32                             makeReserved[4];
  366. };
  367. typedef struct DMMakeAndModelRec        DMMakeAndModelRec;
  368.  
  369. typedef DMMakeAndModelRec *                DMMakeAndModelPtr;
  370. typedef CALLBACK_API( void , DMNotificationProcPtr )(AppleEvent *theEvent);
  371. typedef CALLBACK_API( void , DMExtendedNotificationProcPtr )(void *userData, short theMessage, void *notifyData);
  372. typedef CALLBACK_API( void , DMComponentListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMComponentListEntryPtr componentInfo);
  373. typedef CALLBACK_API( void , DMDisplayModeListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMDisplayModeListEntryPtr displaymodeInfo);
  374. typedef STACK_UPP_TYPE(DMNotificationProcPtr)                     DMNotificationUPP;
  375. typedef STACK_UPP_TYPE(DMExtendedNotificationProcPtr)             DMExtendedNotificationUPP;
  376. typedef STACK_UPP_TYPE(DMComponentListIteratorProcPtr)             DMComponentListIteratorUPP;
  377. typedef STACK_UPP_TYPE(DMDisplayModeListIteratorProcPtr)         DMDisplayModeListIteratorUPP;
  378. #if OPAQUE_UPP_TYPES
  379.     EXTERN_API(DMNotificationUPP)
  380.     NewDMNotificationUPP           (DMNotificationProcPtr    userRoutine);
  381.  
  382.     EXTERN_API(DMExtendedNotificationUPP)
  383.     NewDMExtendedNotificationUPP    (DMExtendedNotificationProcPtr userRoutine);
  384.  
  385.     EXTERN_API(DMComponentListIteratorUPP)
  386.     NewDMComponentListIteratorUPP    (DMComponentListIteratorProcPtr userRoutine);
  387.  
  388.     EXTERN_API(DMDisplayModeListIteratorUPP)
  389.     NewDMDisplayModeListIteratorUPP    (DMDisplayModeListIteratorProcPtr userRoutine);
  390.  
  391.     EXTERN_API(void)
  392.     DisposeDMNotificationUPP       (DMNotificationUPP        userUPP);
  393.  
  394.     EXTERN_API(void)
  395.     DisposeDMExtendedNotificationUPP    (DMExtendedNotificationUPP userUPP);
  396.  
  397.     EXTERN_API(void)
  398.     DisposeDMComponentListIteratorUPP    (DMComponentListIteratorUPP userUPP);
  399.  
  400.     EXTERN_API(void)
  401.     DisposeDMDisplayModeListIteratorUPP    (DMDisplayModeListIteratorUPP userUPP);
  402.  
  403.     EXTERN_API(void)
  404.     InvokeDMNotificationUPP           (AppleEvent *            theEvent,
  405.                                     DMNotificationUPP        userUPP);
  406.  
  407.     EXTERN_API(void)
  408.     InvokeDMExtendedNotificationUPP    (void *                userData,
  409.                                     short                    theMessage,
  410.                                     void *                    notifyData,
  411.                                     DMExtendedNotificationUPP userUPP);
  412.  
  413.     EXTERN_API(void)
  414.     InvokeDMComponentListIteratorUPP    (void *                userData,
  415.                                     DMListIndexType            itemIndex,
  416.                                     DMComponentListEntryPtr    componentInfo,
  417.                                     DMComponentListIteratorUPP userUPP);
  418.  
  419.     EXTERN_API(void)
  420.     InvokeDMDisplayModeListIteratorUPP    (void *            userData,
  421.                                     DMListIndexType            itemIndex,
  422.                                     DMDisplayModeListEntryPtr displaymodeInfo,
  423.                                     DMDisplayModeListIteratorUPP userUPP);
  424.  
  425. #else
  426.     enum { uppDMNotificationProcInfo = 0x000000C0 };                 /* pascal no_return_value Func(4_bytes) */
  427.     enum { uppDMExtendedNotificationProcInfo = 0x00000EC0 };         /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
  428.     enum { uppDMComponentListIteratorProcInfo = 0x00000FC0 };         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  429.     enum { uppDMDisplayModeListIteratorProcInfo = 0x00000FC0 };     /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  430.     #define NewDMNotificationUPP(userRoutine)                         (DMNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMNotificationProcInfo, GetCurrentArchitecture())
  431.     #define NewDMExtendedNotificationUPP(userRoutine)                 (DMExtendedNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMExtendedNotificationProcInfo, GetCurrentArchitecture())
  432.     #define NewDMComponentListIteratorUPP(userRoutine)                 (DMComponentListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMComponentListIteratorProcInfo, GetCurrentArchitecture())
  433.     #define NewDMDisplayModeListIteratorUPP(userRoutine)             (DMDisplayModeListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMDisplayModeListIteratorProcInfo, GetCurrentArchitecture())
  434.     #define DisposeDMNotificationUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  435.     #define DisposeDMExtendedNotificationUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  436.     #define DisposeDMComponentListIteratorUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  437.     #define DisposeDMDisplayModeListIteratorUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  438.     #define InvokeDMNotificationUPP(theEvent, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppDMNotificationProcInfo, (theEvent))
  439.     #define InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMExtendedNotificationProcInfo, (userData), (theMessage), (notifyData))
  440.     #define InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMComponentListIteratorProcInfo, (userData), (itemIndex), (componentInfo))
  441.     #define InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppDMDisplayModeListIteratorProcInfo, (userData), (itemIndex), (displaymodeInfo))
  442. #endif
  443. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  444. #define NewDMNotificationProc(userRoutine)                         NewDMNotificationUPP(userRoutine)
  445. #define NewDMExtendedNotificationProc(userRoutine)                 NewDMExtendedNotificationUPP(userRoutine)
  446. #define NewDMComponentListIteratorProc(userRoutine)             NewDMComponentListIteratorUPP(userRoutine)
  447. #define NewDMDisplayModeListIteratorProc(userRoutine)             NewDMDisplayModeListIteratorUPP(userRoutine)
  448. #define CallDMNotificationProc(userRoutine, theEvent)            InvokeDMNotificationUPP(theEvent, userRoutine)
  449. #define CallDMExtendedNotificationProc(userRoutine, userData, theMessage, notifyData) InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userRoutine)
  450. #define CallDMComponentListIteratorProc(userRoutine, userData, itemIndex, componentInfo) InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userRoutine)
  451. #define CallDMDisplayModeListIteratorProc(userRoutine, userData, itemIndex, displaymodeInfo) InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userRoutine)
  452.  
  453. EXTERN_API( GDHandle )
  454. DMGetFirstScreenDevice            (Boolean                 activeOnly)                            TWOWORDINLINE(0x7000, 0xABEB);
  455.  
  456. EXTERN_API( GDHandle )
  457. DMGetNextScreenDevice            (GDHandle                 theDevice,
  458.                                  Boolean                 activeOnly)                            TWOWORDINLINE(0x7001, 0xABEB);
  459.  
  460. EXTERN_API( void )
  461. DMDrawDesktopRect                (Rect *                    globalRect)                            TWOWORDINLINE(0x7002, 0xABEB);
  462.  
  463. EXTERN_API( void )
  464. DMDrawDesktopRegion                (RgnHandle                 globalRgn)                            TWOWORDINLINE(0x7003, 0xABEB);
  465.  
  466.  
  467.  
  468. EXTERN_API( OSErr )
  469. DMBeginConfigureDisplays        (Handle *                displayState)                        THREEWORDINLINE(0x303C, 0x0206, 0xABEB);
  470.  
  471. EXTERN_API( OSErr )
  472. DMEndConfigureDisplays            (Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0207, 0xABEB);
  473.  
  474. EXTERN_API( OSErr )
  475. DMAddDisplay                    (GDHandle                 newDevice,
  476.                                  short                     driver,
  477.                                  unsigned long             mode,
  478.                                  unsigned long             reserved,
  479.                                  unsigned long             displayID,
  480.                                  Component                 displayComponent,
  481.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
  482.  
  483. EXTERN_API( OSErr )
  484. DMMoveDisplay                    (GDHandle                 moveDevice,
  485.                                  short                     x,
  486.                                  short                     y,
  487.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0609, 0xABEB);
  488.  
  489. EXTERN_API( OSErr )
  490. DMDisableDisplay                (GDHandle                 disableDevice,
  491.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x040A, 0xABEB);
  492.  
  493. EXTERN_API( OSErr )
  494. DMEnableDisplay                    (GDHandle                 enableDevice,
  495.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x040B, 0xABEB);
  496.  
  497. EXTERN_API( OSErr )
  498. DMRemoveDisplay                    (GDHandle                 removeDevice,
  499.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x040C, 0xABEB);
  500.  
  501.  
  502.  
  503.  
  504. EXTERN_API( OSErr )
  505. DMSetMainDisplay                (GDHandle                 newMainDevice,
  506.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0410, 0xABEB);
  507.  
  508. EXTERN_API( OSErr )
  509. DMSetDisplayMode                (GDHandle                 theDevice,
  510.                                  unsigned long             mode,
  511.                                  unsigned long *        depthMode,
  512.                                  unsigned long             reserved,
  513.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
  514.  
  515. EXTERN_API( OSErr )
  516. DMCheckDisplayMode                (GDHandle                 theDevice,
  517.                                  unsigned long             mode,
  518.                                  unsigned long             depthMode,
  519.                                  unsigned long *        switchFlags,
  520.                                  unsigned long             reserved,
  521.                                  Boolean *                modeOk)                                THREEWORDINLINE(0x303C, 0x0C12, 0xABEB);
  522.  
  523. EXTERN_API( OSErr )
  524. DMGetDeskRegion                    (RgnHandle *            desktopRegion)                        THREEWORDINLINE(0x303C, 0x0213, 0xABEB);
  525.  
  526. EXTERN_API( OSErr )
  527. DMRegisterNotifyProc            (DMNotificationUPP         notificationProc,
  528.                                  ProcessSerialNumberPtr  whichPSN)                            THREEWORDINLINE(0x303C, 0x0414, 0xABEB);
  529.  
  530. EXTERN_API( OSErr )
  531. DMRemoveNotifyProc                (DMNotificationUPP         notificationProc,
  532.                                  ProcessSerialNumberPtr  whichPSN)                            THREEWORDINLINE(0x303C, 0x0415, 0xABEB);
  533.  
  534. EXTERN_API( OSErr )
  535. DMQDIsMirroringCapable            (Boolean *                qdIsMirroringCapable)                THREEWORDINLINE(0x303C, 0x0216, 0xABEB);
  536.  
  537. EXTERN_API( OSErr )
  538. DMCanMirrorNow                    (Boolean *                canMirrorNow)                        THREEWORDINLINE(0x303C, 0x0217, 0xABEB);
  539.  
  540. EXTERN_API( OSErr )
  541. DMIsMirroringOn                    (Boolean *                isMirroringOn)                        THREEWORDINLINE(0x303C, 0x0218, 0xABEB);
  542.  
  543. EXTERN_API( OSErr )
  544. DMMirrorDevices                    (GDHandle                 gD1,
  545.                                  GDHandle                 gD2,
  546.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0619, 0xABEB);
  547.  
  548. EXTERN_API( OSErr )
  549. DMUnmirrorDevice                (GDHandle                 gDevice,
  550.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x041A, 0xABEB);
  551.  
  552. EXTERN_API( OSErr )
  553. DMGetNextMirroredDevice            (GDHandle                 gDevice,
  554.                                  GDHandle *                mirroredDevice)                        THREEWORDINLINE(0x303C, 0x041B, 0xABEB);
  555.  
  556. EXTERN_API( OSErr )
  557. DMBlockMirroring                (void)                                                        TWOWORDINLINE(0x701C, 0xABEB);
  558.  
  559. EXTERN_API( OSErr )
  560. DMUnblockMirroring                (void)                                                        TWOWORDINLINE(0x701D, 0xABEB);
  561.  
  562. EXTERN_API( OSErr )
  563. DMGetDisplayMgrA5World            (Ptr *                    dmA5)                                THREEWORDINLINE(0x303C, 0x021E, 0xABEB);
  564.  
  565. EXTERN_API( OSErr )
  566. DMGetDisplayIDByGDevice            (GDHandle                 displayDevice,
  567.                                  DisplayIDType *        displayID,
  568.                                  Boolean                 failToMain)                            THREEWORDINLINE(0x303C, 0x051F, 0xABEB);
  569.  
  570. EXTERN_API( OSErr )
  571. DMGetGDeviceByDisplayID            (DisplayIDType             displayID,
  572.                                  GDHandle *                displayDevice,
  573.                                  Boolean                 failToMain)                            THREEWORDINLINE(0x303C, 0x0520, 0xABEB);
  574.  
  575. EXTERN_API( OSErr )
  576. DMSetDisplayComponent            (GDHandle                 theDevice,
  577.                                  Component                 displayComponent)                    THREEWORDINLINE(0x303C, 0x0421, 0xABEB);
  578.  
  579. EXTERN_API( OSErr )
  580. DMGetDisplayComponent            (GDHandle                 theDevice,
  581.                                  Component *            displayComponent)                    THREEWORDINLINE(0x303C, 0x0422, 0xABEB);
  582.  
  583. EXTERN_API( OSErr )
  584. DMNewDisplay                    (GDHandle *                newDevice,
  585.                                  short                     driverRefNum,
  586.                                  unsigned long             mode,
  587.                                  unsigned long             reserved,
  588.                                  DisplayIDType             displayID,
  589.                                  Component                 displayComponent,
  590.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0D23, 0xABEB);
  591.  
  592. EXTERN_API( OSErr )
  593. DMDisposeDisplay                (GDHandle                 disposeDevice,
  594.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x0424, 0xABEB);
  595.  
  596. EXTERN_API( OSErr )
  597. DMResolveDisplayComponents        (void)                                                        TWOWORDINLINE(0x7025, 0xABEB);
  598.  
  599. EXTERN_API( OSErr )
  600. DMRegisterExtendedNotifyProc    (DMExtendedNotificationUPP  notifyProc,
  601.                                  void *                    notifyUserData,
  602.                                  unsigned short         nofifyOnFlags,
  603.                                  ProcessSerialNumberPtr  whichPSN)                            THREEWORDINLINE(0x303C, 0x07EF, 0xABEB);
  604.  
  605. EXTERN_API( OSErr )
  606. DMRemoveExtendedNotifyProc        (DMExtendedNotificationUPP  notifyProc,
  607.                                  void *                    notifyUserData,
  608.                                  ProcessSerialNumberPtr  whichPSN,
  609.                                  unsigned short         removeFlags)                        THREEWORDINLINE(0x303C, 0x0726, 0xABEB);
  610.  
  611. EXTERN_API( OSErr )
  612. DMNewAVPanelList                (DisplayIDType             displayID,
  613.                                  ResType                 panelType,
  614.                                  DMFidelityType         minimumFidelity,
  615.                                  unsigned long             panelListFlags,
  616.                                  unsigned long             reserved,
  617.                                  DMListIndexType *        thePanelCount,
  618.                                  DMListType *            thePanelList)                        THREEWORDINLINE(0x303C, 0x0C27, 0xABEB);
  619.  
  620. EXTERN_API( OSErr )
  621. DMNewAVEngineList                (DisplayIDType             displayID,
  622.                                  ResType                 engineType,
  623.                                  DMFidelityType         minimumFidelity,
  624.                                  unsigned long             engineListFlags,
  625.                                  unsigned long             reserved,
  626.                                  DMListIndexType *        engineCount,
  627.                                  DMListType *            engineList)                            THREEWORDINLINE(0x303C, 0x0C28, 0xABEB);
  628.  
  629. EXTERN_API( OSErr )
  630. DMNewAVDeviceList                (ResType                 deviceType,
  631.                                  unsigned long             deviceListFlags,
  632.                                  unsigned long             reserved,
  633.                                  DMListIndexType *        deviceCount,
  634.                                  DMListType *            deviceList)                            THREEWORDINLINE(0x303C, 0x0A29, 0xABEB);
  635.  
  636. EXTERN_API( OSErr )
  637. DMNewAVPortListByPortType        (ResType                 subType,
  638.                                  unsigned long             portListFlags,
  639.                                  unsigned long             reserved,
  640.                                  DMListIndexType *        devicePortCount,
  641.                                  DMListType *            theDevicePortList)                    THREEWORDINLINE(0x303C, 0x0A2A, 0xABEB);
  642.  
  643. EXTERN_API( OSErr )
  644. DMGetIndexedComponentFromList    (DMListType             panelList,
  645.                                  DMListIndexType         itemIndex,
  646.                                  unsigned long             reserved,
  647.                                  DMComponentListIteratorUPP  listIterator,
  648.                                  void *                    userData)                            THREEWORDINLINE(0x303C, 0x0A2B, 0xABEB);
  649.  
  650. EXTERN_API( OSErr )
  651. DMDisposeList                    (DMListType             panelList)                            THREEWORDINLINE(0x303C, 0x022C, 0xABEB);
  652.  
  653. EXTERN_API( OSErr )
  654. DMGetNameByAVID                    (AVIDType                 theID,
  655.                                  unsigned long             nameFlags,
  656.                                  Str255                 name)                                THREEWORDINLINE(0x303C, 0x062D, 0xABEB);
  657.  
  658. EXTERN_API( OSErr )
  659. DMNewAVIDByPortComponent        (Component                 thePortComponent,
  660.                                  ResType                 portKind,
  661.                                  unsigned long             reserved,
  662.                                  AVIDType *                newID)                                THREEWORDINLINE(0x303C, 0x082E, 0xABEB);
  663.  
  664. EXTERN_API( OSErr )
  665. DMGetPortComponentByAVID        (DisplayIDType             thePortID,
  666.                                  Component *            thePortComponent,
  667.                                  ComponentDescription *    theDesciption,
  668.                                  ResType *                thePortKind)                        THREEWORDINLINE(0x303C, 0x082F, 0xABEB);
  669.  
  670. EXTERN_API( OSErr )
  671. DMSendDependentNotification        (ResType                 notifyType,
  672.                                  ResType                 notifyClass,
  673.                                  AVIDType                 displayID,
  674.                                  ComponentInstance         notifyComponent)                    THREEWORDINLINE(0x303C, 0x0830, 0xABEB);
  675.  
  676. EXTERN_API( OSErr )
  677. DMDisposeAVComponent            (Component                 theAVComponent)                        THREEWORDINLINE(0x303C, 0x0231, 0xABEB);
  678.  
  679. EXTERN_API( OSErr )
  680. DMSaveScreenPrefs                (unsigned long             reserved1,
  681.                                  unsigned long             saveFlags,
  682.                                  unsigned long             reserved2)                            THREEWORDINLINE(0x303C, 0x0632, 0xABEB);
  683.  
  684. EXTERN_API( OSErr )
  685. DMNewAVIDByDeviceComponent        (Component                 theDeviceComponent,
  686.                                  ResType                 portKind,
  687.                                  unsigned long             reserved,
  688.                                  DisplayIDType *        newID)                                THREEWORDINLINE(0x303C, 0x0833, 0xABEB);
  689.  
  690. EXTERN_API( OSErr )
  691. DMNewAVPortListByDeviceAVID        (AVIDType                 theID,
  692.                                  DMFidelityType         minimumFidelity,
  693.                                  unsigned long             portListFlags,
  694.                                  unsigned long             reserved,
  695.                                  DMListIndexType *        devicePortCount,
  696.                                  DMListType *            theDevicePortList)                    THREEWORDINLINE(0x303C, 0x0C34, 0xABEB);
  697.  
  698. EXTERN_API( OSErr )
  699. DMGetDeviceComponentByAVID        (AVIDType                 theDeviceID,
  700.                                  Component *            theDeviceComponent,
  701.                                  ComponentDescription *    theDesciption,
  702.                                  ResType *                theDeviceKind)                        THREEWORDINLINE(0x303C, 0x0835, 0xABEB);
  703.  
  704. EXTERN_API( OSErr )
  705. DMNewDisplayModeList            (DisplayIDType             displayID,
  706.                                  unsigned long             modeListFlags,
  707.                                  unsigned long             reserved,
  708.                                  DMListIndexType *        thePanelCount,
  709.                                  DMListType *            thePanelList)                        THREEWORDINLINE(0x303C, 0x0A36, 0xABEB);
  710.  
  711. EXTERN_API( OSErr )
  712. DMGetIndexedDisplayModeFromList    (DMListType             panelList,
  713.                                  DMListIndexType         itemIndex,
  714.                                  unsigned long             reserved,
  715.                                  DMDisplayModeListIteratorUPP  listIterator,
  716.                                  void *                    userData)                            THREEWORDINLINE(0x303C, 0x0A37, 0xABEB);
  717.  
  718. EXTERN_API( OSErr )
  719. DMGetGraphicInfoByAVID            (AVIDType                 theID,
  720.                                  PicHandle *            theAVPcit,
  721.                                  Handle *                theAVIconSuite,
  722.                                  AVLocationRec *        theAVLocation)                        THREEWORDINLINE(0x303C, 0x0838, 0xABEB);
  723.  
  724. EXTERN_API( OSErr )
  725. DMGetAVPowerState                (AVIDType                 theID,
  726.                                  AVPowerStatePtr         getPowerState,
  727.                                  unsigned long             reserved1)                            THREEWORDINLINE(0x303C, 0x0839, 0xABEB);
  728.  
  729. EXTERN_API( OSErr )
  730. DMSetAVPowerState                (AVIDType                 theID,
  731.                                  AVPowerStatePtr         setPowerState,
  732.                                  unsigned long             powerFlags,
  733.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x083A, 0xABEB);
  734.  
  735. EXTERN_API( OSErr )
  736. DMGetDeviceAVIDByPortAVID        (AVIDType                 portAVID,
  737.                                  AVIDType *                deviceAVID)                            THREEWORDINLINE(0x303C, 0x043B, 0xABEB);
  738.  
  739. EXTERN_API( OSErr )
  740. DMGetEnableByAVID                (AVIDType                 theAVID,
  741.                                  Boolean *                isAVIDEnabledNow,
  742.                                  Boolean *                canChangeEnableNow)                    THREEWORDINLINE(0x303C, 0x063C, 0xABEB);
  743.  
  744. EXTERN_API( OSErr )
  745. DMSetEnableByAVID                (AVIDType                 theAVID,
  746.                                  Boolean                 doEnable,
  747.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x053D, 0xABEB);
  748.  
  749. EXTERN_API( OSErr )
  750. DMGetDisplayMode                (GDHandle                 theDevice,
  751.                                  VDSwitchInfoPtr         switchInfo)                            THREEWORDINLINE(0x303C, 0x043E, 0xABEB);
  752.  
  753. EXTERN_API( OSErr )
  754. DMConfirmConfiguration            (ModalFilterUPP         filterProc,
  755.                                  UInt32                 confirmFlags,
  756.                                  UInt32                 reserved,
  757.                                  Handle                 displayState)                        THREEWORDINLINE(0x303C, 0x083F, 0xABEB);
  758.  
  759.  
  760.  
  761. #if PRAGMA_STRUCT_ALIGN
  762.     #pragma options align=reset
  763. #elif PRAGMA_STRUCT_PACKPUSH
  764.     #pragma pack(pop)
  765. #elif PRAGMA_STRUCT_PACK
  766.     #pragma pack()
  767. #endif
  768.  
  769. #ifdef PRAGMA_IMPORT_OFF
  770. #pragma import off
  771. #elif PRAGMA_IMPORT
  772. #pragma import reset
  773. #endif
  774.  
  775. #ifdef __cplusplus
  776. }
  777. #endif
  778.  
  779. #endif /* __DISPLAYS__ */
  780.  
  781.